Add Coccinelle usage: one for blacklisting, one for patch collection
authorColin Walters <walters@verbum.org>
Thu, 23 Mar 2017 17:06:07 +0000 (13:06 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 30 Mar 2017 19:19:54 +0000 (19:19 +0000)
commit305db981d47e4aa417dd90164b1995e008d25757
tree6a391e2627f8969ced1ecc5ff2b2d60c36c03b5a
parentee626c2654b877f5ae6771933330c381efa7e802
Add Coccinelle usage: one for blacklisting, one for patch collection

This is inspired by the [Coccinelle](http://coccinelle.lip6.fr/) usage
in systemd.  I also took it a bit further and added infrastructure
to have spatches which should never apply.  This acts as a blacklist.

The reason to do the latter is that coccinelle is *way* more powerful than the
regular expresssions we have in `make syntax-check`.

I started with blacklisting `g_error_free()` directly. The reason that's bad is
it leaves a dangling pointer.

Closes: #754
Approved by: jlebon
12 files changed:
.redhat-ci.Dockerfile
.redhat-ci.yml
Makefile-tests.am
coccinelle/README.md [new file with mode: 0644]
coccinelle/newstyle.cocci [new file with mode: 0644]
src/libostree/ostree-repo-pull.c
src/ostree/main.c
src/ostree/ot-main.c
tests/coccinelle.sh [new file with mode: 0755]
tests/coccinelle/README.md [new file with mode: 0644]
tests/coccinelle/raw-free.cocci [new file with mode: 0644]
tests/test-rollsum-cli.c